import VueRouter from "vue-router"


//导入不同主键
import HomeContainer from './components/tabber/HomeContainer.vue'
import MenberContainer from './components/tabber/MenberContainer.vue'
import ShoppingContainer from './components/tabber/ShoppingContainer.vue'
import SearchContainer from './components/tabber/SearchContainer.vue'
import NewList from './components/news/NewList.vue'
import NewInfo from './components/news/NewInfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/PhotoInfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import GoodsComment from './components/goods/GoodsComment.vue'

var router = new VueRouter({
  routes: [ // 配置路由规则

    { path: '/', redirect: '/home' },
    { path: '/home', component: HomeContainer },
    { path: '/Menber', component: MenberContainer },
    { path: '/shoppingcart', component: ShoppingContainer },
    { path: '/search', component: SearchContainer },
		 { path: '/home/newlist', component: NewList },
		  { path: '/home/newinfo/:id', component: NewInfo },
			 { path: '/home/photolist', component: PhotoList },
			  { path: '/home/photoinfo/:id', component: PhotoInfo },
		    { path: '/home/goodslist', component: GoodsList },
    { path: '/home/goodsinfo/:id', component: GoodsInfo, name: 'goodsinfo' },
    { path: '/home/goodsdesc/:id', component:GoodsDesc, name: 'goodsdesc'  },
    { path: '/home/goodscomment/:id', component: GoodsComment, name: 'goodscomment' }
  ],
  linkActiveClass: 'mui-active' // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})
export default router